# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-audioencoder-vorbis
pkgver=20.2.0
_realname=Nexus
pkgrel=1
pkgdesc="Vorbis encoder addon for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/audioencoder.vorbis"
arch="x86_64 aarch64 armv7" # kodi is available only on these architectures
license="GPL-2.0-only"
makedepends="cmake libvorbis-dev kodi-dev samurai"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/audioencoder.vorbis/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/audioencoder.vorbis-$pkgver-$_realname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8465b4ad73efee6adaa385eeaa75ceca725a8257fbf4867c8094661408fcb7d028f977b913c9f873ff1cbd6fa7e20afdc92b95ed38e48dfcba9c00e3ac4b81ae  kodi-audioencoder-vorbis-20.2.0-Nexus.tar.gz
"
